<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>

<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->

<head />
<body bgcolor="white">
Provides an HBase <a href="http://incubator.apache.org/thrift/">Thrift</a>
service.

This directory contains a Thrift interface definition file for an HBase RPC
service and a Java server implementation.


<h2><a name="whatisthrift">What is Thrift?</a></h2> 
<p><blockquote>"Thrift is a software framework for scalable cross-language services development.
It combines a software stack with a code generation engine to build services
that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby,
Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml."</blockquote>

<h2>Important note</h2>
<p><b><u>We tried to deprecate this Thrift interface and replace it
with the Interface defined over in the thrift2 package only this package will not die.
Folks keep adding to it and fixing it up so its around for another while until someone
takes command and drives this package out of existence replacing it w/ an Interface that
better matches the hbase API (this package was modelled on old HBase API long since dropped).
</u></b></p>

<h2><a name="description">Description</a></h2>
<p>The org.apache.hadoop.hbase.thrift.generated.Hbase.Iface HBase API is defined in the
file <a href="doc-files/index.html">Hbase.thrift</a> (Click the former to see the
thrift generated documentation of thrift interface). A server-side implementation of the API is in
{@link org.apache.hadoop.hbase.thrift.ThriftServer}. The generated interfaces,
types, and RPC utility files reside in the
org.apache.hadoop.hbase.thrift.generated package.
</p>

<p>To start ThriftServer, use:
<pre>
  ./bin/hbase-daemon.sh start thrift
</pre>

<p>To stop, use:
<pre>
  ./bin/hbase-daemon.sh stop thrift
</pre>

These are the command line arguments the Thrift server understands in addition to <code>start</code> and <code>stop</code>:
<dl>
    <dt><code>-b, --bind</code></dt>
    <dd>Address to bind the Thrift server to. Not supported by the Nonblocking and HsHa server [default: <code>0.0.0.0</code>]</dd>

    <dt><code>-p, --port</code></dt>
    <dd>Port to bind to [default: <code>9090</code>]</dd>

    <dt><code>-f, --framed</code></dt>
    <dd>Use framed transport (implied when using one of the non-blocking servers)</dd>

    <dt><code>-c, --compact</code></dt>
    <dd>Use the compact protocol [default: binary protocol]</dd>

    <dt><code>-h, --help</code></dt>
    <dd>Displays usage information for the Thrift server</dd>

    <dt><code>-threadpool</code></dt>
    <dd>Use the TThreadPoolServer. This is the default.</dd>

    <dt><code>-hsha</code></dt>
    <dd>Use the THsHaServer. This implies the framed transport.</dd>

    <dt><code>-nonblocking</code></dt>
    <dd>Use the TNonblockingServer. This implies the framed transport.</dd>
</dl>

<h3><a name="details">Details</a></h3>

<p>HBase currently uses version 0.9.0 of Apache Thrift.</p>

<p>The files were generated by running the commands under the hbase checkout dir:
<pre>
  mvn compile -Pcompile-thrift
</pre>

<p>The 'thrift' binary is the Thrift compiler, and it is distributed as a part
of the Thrift package. Additionally, specific language runtime libraries are a
part of the Thrift package. A version of the Java runtime is included in HBase
via Maven.</p>

</body>
</html>
